import React, { Component } from 'react'
import { Route, NavLink } from 'react-router-dom'
import Test from './Test'
import Music from './Music'
export default class Find extends Component {
  render() {
    return (
      <div>
        <h3>发现音乐</h3>
        <NavLink to="/find/test">滴滴滴</NavLink>
        <Route path="/find/test" component={Test}></Route>
        <button onClick={this.goMy}>点击去我的</button>
        <ul>
          <li><NavLink to='/find/music/1'>音乐列表1</NavLink></li>
          <li><NavLink to='/find/music/2'>音乐列表2</NavLink></li>
          <li><NavLink to='/find/music/3'>音乐列表3</NavLink></li>
        </ul>
        <Route path="/find/music/:id" component={Music}></Route>
      </div>
    )
  }
  goMy = () => {
    console.log(this.props);
    this.props.history.push('/My')
  }
}
